package com.situ.javase.week3.Day2;

public class MathSqrt {
	
	private  Double num;
	private  Double result;
	
	
	public  MathSqrt(Double num) {
		this.num = num;
		this.result = result;
	    
}
	
	public void jisuan(Double num) throws ZiExpection {
		result = Math.sqrt(num);
		if (num < 0) {
			throw new ZiExpection();
		}else {
			System.out.println("结果为" + result);
		}
	}
}
